Skip to content

refactor: use shared require_treasury/get_fee_bps helpers at all call… - #412

Merged
chonilius merged 1 commit into
MergeFi:mainfrom
public-contribitions-1010:refactor/use-shared-treasury-fee-bps-helpers
Sep 27, 2026
Merged

chonilius merged 1 commit into
MergeFi:mainfrom
public-contribitions-1010:refactor/use-shared-treasury-fee-bps-helpers

Conversation

@Enchanterme

Copy link
Copy Markdown

… sites

Replace every inline env.storage().instance().get(&DataKey::Treasury) and .get(&DataKey::FeeBps) read across escrow, milestones, and maintenance-pool with the mergefi_common::require_treasury and mergefi_common::get_fee_bps helpers that already exist for this purpose.

The TreasuryKey/FeeBpsKey traits were already implemented for all three contracts' DataKey enums, so the helpers work identically — this resolves the triplication #162/#163 identified at the call sites themselves.

Summary

Related issues

Closes #325
Closes #326
Closes #241
Closes #338

Changes

Test plan

  • Existing tests pass (make test)
  • New tests added for changed behaviour
  • Manually verified against a local node / testnet where applicable

Checklist

  • Branch is up to date with main
  • No debug / dead code left in
  • cargo fmt and cargo clippy are clean

… sites

Replace every inline env.storage().instance().get(&DataKey::Treasury) and
.get(&DataKey::FeeBps) read across escrow, milestones, and maintenance-pool
with the mergefi_common::require_treasury and mergefi_common::get_fee_bps
helpers that already exist for this purpose.

The TreasuryKey/FeeBpsKey traits were already implemented for all three
contracts' DataKey enums, so the helpers work identically — this resolves
the triplication MergeFi#162/MergeFi#163 identified at the call sites themselves.
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Enchanterme Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@chonilius
chonilius merged commit 4a7d126 into MergeFi:main Sep 27, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment